package com.qriver.shardingjdbc.service;

import com.qriver.shardingjdbc.entity.DemoEntity;
import com.qriver.shardingjdbc.mapper.DemoMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DemoService {

    @Autowired
    private DemoMapper demoMapper;

    public void insert(DemoEntity entity){
        demoMapper.insert(entity);
    }

    public List<DemoEntity> findAll(){
        return demoMapper.findAll();
    }
}
